import express from 'express';
require('dotenv').config();
const cookieParser = require('cookie-parser');
// import cookieParser from 'cookie-parser';
import route from './routes/index';
const app = express();
app.use(express.urlencoded({ extended: false }));
app.use(express.json());
app.use(cookieParser());
app.use('/', route);
const port = process.env.PORT || 5000;
app.listen(port, () => {
  console.log(`server is running on port ${port}`);
});
